# def get_info(name,age):
#     if not 0 < age < 120:
#         raise ValueError('年龄超过范围（1-119）')
#     print('%s is %s years old' % (name,age))
# if __name__ == '__main__':
#     get_info('牛老师', 20)
#
#
# def get_info(name,age):
#     if  not 0 <  age < 120:
#         raise ValueError('vv')
#     print('%s is %s yesrs old' % (name,age))
# if __name__ == '__main__':
#     get_info('牛老师',20)
def get_info(name,age):
    if not 0 <  age < 120:
        raise ValueError('年龄超出1到200之间')
    print('%s is %s ' % (name,age))

def get_info2(name,age):
    assert 0 < age < 120 , ('年龄超出1到200之间')
    print('%s is %s years old' % (name,age))
if __name__ == '__main__':
    get_info('牛老师',20)
    get_info2('庞老师',18)